package com.xana.acg.mikomiko.views;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.SeekBar;

import com.xana.acg.mikomiko.R;
import com.xana.acg.mikomiko.media.AnimeView;
import com.xana.acg.mikomiko.media.JZMediaAliyun;

import cn.jzvd.JZDataSource;
import cn.jzvd.JZMediaSystem;
import cn.jzvd.JZUtils;
public class AnimView extends AnimeView {
    public AnimView(Context context) {
        super(context);
    }

    public AnimView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
        if (fromUser) {
            //设置这个progres对应的时间，给textview
            long duration = getDuration();
            currentTimeTextView.setText(JZUtils.stringForTime(progress * duration / 100));
        }
    }

    public void setUp(JZDataSource jzDataSource, int screen) {
        setUp(jzDataSource, screen, JZMediaAliyun.class);
    }
}
